import React, {useEffect, useState} from 'react';
import style from "./index.module.scss"
import Login from "./Login";
import Register from "./Register";

function Identification(props) {
    let [identState,setIdentState] = useState(0);
    return (
        <div className={style.container}>
            {
                (function (){
                    switch (identState) {
                        case 0:
                            return <Login destroy = {props.destroy}/>
                        case 1:
                            return <Register/>
                        default:
                            return <Login/>
                    }
                })()
            }
        </div>
    );
}

export default Identification;